import 'package:flutter/widgets.dart';

import 'package:thrio/thrio.dart';
import 'list/module.dart' as list;
import 'mine/module.dart' as mine;
import 'detail/module.dart' as detail;
import 'sort/module.dart' as sort;
import 'addInterest/module.dart' as addInterest;
class Module
    with ThrioModule, ModulePageBuilder, ModuleRouteTransitionsBuilder {
  @override
  String get key => 'interest';

  @override
  void onModuleRegister(ModuleContext moduleContext) {
    registerModule(sort.Module(), moduleContext);
    registerModule(list.Module(), moduleContext);
    registerModule(mine.Module(), moduleContext);
    registerModule(detail.Module(), moduleContext);
    registerModule(addInterest.Module(), moduleContext);
  }

  @override
  void onRouteTransitionsBuilderSetting(ModuleContext moduleContext) {
    routeTransitionsBuilder = (
        context,
        animation,
        secondaryAnimation,
        child,
        ) =>
        SlideTransition(
          transformHitTests: false,
          position: Tween<Offset>(
            begin: const Offset(0, 1),
            end: Offset.zero,
          ).animate(animation),
          child: SlideTransition(
            position: Tween<Offset>(
              begin: Offset.zero,
              end: const Offset(0, -1),
            ).animate(secondaryAnimation),
            child: child,
          ),
        );
  }
}



